package Scene5;

import Picture.GameImage;

import java.awt.image.BufferedImage;
import java.nio.Buffer;

public class BG {
    int speed = 0;
    int x = 0;
    int y = 0;
    JumpAnimal jumpAnimal;
    BufferedImage img = GameImage.get("/Picture/背景(2).png");
    int w = img.getWidth();
    int h = img.getHeight();
    public BG(JumpAnimal jumpAnimal){
        this.jumpAnimal = jumpAnimal;

    }
    public void move(){
        if(jumpAnimal.y==jumpAnimal.groundY){
            speed = 0;
        }
        x-=speed/50;
    }
    public void  reOpen(){
        speed = 0;
        x = 0;
        y = 0;
    }
}
